﻿using DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.WorksheetElements;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.Table
{
    [XmlRoot("autoFilter", Namespace = Constants.ExcelMain)]
    public class AutoFilter : XmlSerializable
    {
        [Optional]
        [XmlAttribute("ref", Form = XmlSchemaForm.Qualified)]
        public string Reference { get; set; }

        [Optional]
        [XmlElement("filterColumn", Namespace = Constants.ExcelMain)]
        public XmlList<FilterColumn> FilterColumns { get; set; }

        [Optional]
        [XmlElement("sortState", Namespace = Constants.ExcelMain)]
        public SortState SortState { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.ExcelMain)]
        public ExtensionList ExtensionList { get; set; }

        public AutoFilter()
        {
            FilterColumns = new XmlList<FilterColumn>();
        }
    }
}
